﻿<!DOCTYPE html>
<html>
<head>
    <meta charset="utf-8" />
    <title>@ViewBag.Title</title>
    <link href="@Url.Content("~/Content/css/style.css")" rel="stylesheet" type="text/css" />
    <script src="@Url.Content("~/Scripts/jquery-1.7.1.min.js")" type="text/javascript"></script>
    <script src="@Url.Content("~/Scripts/modernizr-2.5.3.js")" type="text/javascript"></script>
    <script src="@Url.Content("~/Scripts/js/script.js")" type="text/javascript"></script>
    <script src="@Url.Content("~/Scripts/js/jquery-1.7.1.min.js")" type="text/javascript"></script>
    <script type="text/javascript">
        function OnCriteria(page, includeNewCriteria) {

            var crit;

            if (includeNewCriteria) {
                crit = ($('#criteria'))[0].value;
            } else {
                crit = ($('#lastedCriteria'))[0].value;
            }

            $.ajax(
              {
                  type: "GET",
                  url: "/Home/GetTour?criteria=" + crit + "&page=" + page,
                  success: function (result) {
                      $("#main-content").html(result.toString());
                  },

                  error: function () {
                      alert("Lỗi trong quá trình tìm kiếm!");
                  }
              });
        }
</script>
</head>

<body>
    <div id="bg-body">
        <div id="body">
            <header>
                <nav class="main-menu">
                    @Html.Action("GetMainCategories", "MenuItem")
                </nav>
                <form id="search">
                    <div class="fleft">
                        <input id="criteria" type="text" value="@ViewData["criteria"]" onkeypress="javascript:OnCriteria(1, true);" />
                        <input id="lastedCriteria" type="hidden"  value="@ViewData["criteria"]" />
                    </div>
                        
                </form>
                <div class="clear"></div>
                <div id="slide-logo">
                    @Html.Action("GetSlideImages", "Home")
                    <div class="logo"></div>
                </div>
                <div class="clear"></div>
            </header>
            <div id="main">
                <div id="main-content">
                    @RenderBody()
                </div>
                <div class="right">
                    <div id="right-feature">
                        @Html.Action("ViewFeature", "Tour")
                    </div>
                </div>
                <div class="right">
                    <div class="clear"></div>
                    <div id="right-TopView">
                        @Html.Action("TopView", "Tour")
                    </div>
                </div>
                <div class="clear"></div>
            </div>
            <div class="clear"></div>

        </div>
    </div>
</body>
</html>
